home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / boot / ToolManager21b.lha / ToolManager / Scripts / DNetGetFile.rexx next >
OS/2 REXX Batch file  |  1993-05-16  |  2KB  |  48 lines

  1. /*********************************************************/
  2. /*                                                       */
  3. /* rexx:DNetGetFile.rexx  V1.0                           */
  4. /*                                                       */
  5. /* ARexx script for DNet's getfiles                      */
  6. /*                                                       */
  7. /* Requires rexxarplib.library V3.0                      */
  8. /*                                                       */
  9. /* © 1991 Stefan Becker                                  */
  10. /*                                                       */
  11. /* ToolManager configuration file entry for this script: */
  12. /*                                                       */
  13. /* CLI:                                                  */
  14. /* Alias    = Get File                                   */
  15. /* RealName = rx DNetGetFile                             */
  16. /* Path     = <path to DNet binaries>                    */
  17. /* Args     = OFF                                        */
  18. /* #                                                     */
  19. /*                                                       */
  20. /*********************************************************/
  21.  
  22. /* Set constants */
  23. output='CON:0/0/640/100/Downloading File/AUTO/WAIT/ALT/INACTIVE'
  24.  
  25. /* Try to open rexxarplib */
  26. IF ~SHOW('Libraries','rexxarplib.library') THEN
  27.  IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN RETURN 20
  28.  
  29. /* Put up a requester for the file name */
  30. file=Request(50,50,'Specify file name','','Ok','Cancel','Workbench');
  31.  
  32. IF file=='' THEN
  33. /* No file specified */
  34. DO
  35.  /* Print out an error message */
  36.  IF OPEN(error,output,'Write') THEN
  37.   DO
  38.    WRITELN(error,'No file specified')
  39.    WRITELN(error,'exiting...')
  40.    CLOSE(error)
  41.   END
  42. END
  43. /* Download file */
  44. ELSE ADDRESS COMMAND 'getfiles >"'output'"' '"'file'"'
  45.  
  46. /* Exit script */
  47. RETURN 0
  48.